package com.demo.commons.message;

import cn.lingyangwl.framework.mq.base.BaseMqMessage;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.text.SimpleDateFormat;

/**
 * @author shenguangyang
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class PriorityQueueMessage extends BaseMqMessage {
    private Integer count;
    private Long createTime;

    public PriorityQueueMessage() {

    }

    @Override
    public String toString() {
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String date = format.format(createTime);
        return "PriorityQueueMessage{" +
                "count=" + count +
                ", createTime=" + date +
                '}';
    }
}
